package com.example.mansystem.dto;

import lombok.Data;
import org.hibernate.validator.constraints.Length;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.Pattern;

@Data
public class LoginDto {
    @Length(min = 3,max=18)
    @Pattern(regexp = "^[a-z0-9A-Z_-]{3,16}$",message = "用户名格式不正确")
    private String username;
    @NotBlank(message = "密码不为空")
    @Pattern(regexp = "^[a-z0-9A-Z_-]{6,16}$",message = "密码格式不正确")
    private String password;
}
